//
//  NSAttributedString+Extension.m
//  SinaWebo
//
//  Created by wwj on 16/5/19.
//  Copyright © 2016年 亦心. All rights reserved.
//

#import "NSAttributedString+Extension.h"

@implementation NSAttributedString (Extension)
-(CGSize)attributedSize:(CGSize)maxSize{
    NSStringDrawingOptions options = NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading;
    return [self boundingRectWithSize:maxSize options:options context:nil].size;
}

-(CGSize)attributedSize{
    NSStringDrawingOptions options = NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading;
    return [self boundingRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) options:options context:nil].size;
}
@end
